<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

<h:head> <h:title> Edit a Transportation Mean </h:title></h:head>
<h:body onload="#{transportEdit.searchById()}">
<h:form>
<p:menubar>  
        <p:submenu label="Package Section" >  
            <p:menuitem value="Create Package" url="packageInsertion.xhtml" />  
            <p:menuitem value="All Packages" url="package.xhtml" />  
        </p:submenu>  
  
        <p:submenu label="Hotel Section" >  
            <p:menuitem value="Add Hotel" url="hotelInsert.xhtml" />  
            <p:menuitem value="All Hotel" url="hotel.xhtml" />  
        </p:submenu>  
        
         <p:submenu label="Transportation Section" >  
            <p:menuitem value="Add Transportation" url="transportationInsert.xhtml" />  
            <p:menuitem value="All Transportation" url="transportationMean.xhtml" />  
        </p:submenu>  
        
         <p:submenu label="Excursion Section" >  
            <p:menuitem value="Add Excursion" url="excursionInsert.xhtml" />  
            <p:menuitem value="All Excursion" url="excursion.xhtml" />  
        </p:submenu>  
  
       <f:facet name="options">   
       		<p:commandButton value="Check OutDated Package" action="#{CheckInvalid.checkAll()}"/>
            <p:commandButton value="Logout" action="#{LoginManaged.logout()}"/>
       </f:facet>
    </p:menubar>  
    </h:form>
    <h:form>
<p:panelGrid columns="3">
<p:outputLabel>Name</p:outputLabel>
<p:inputText id="name" value="#{transportEdit.tDTO.name}" />
<p:message for="name"></p:message>
<p:outputLabel>Available Places</p:outputLabel>
<p:inputText id="avl" value="#{transportEdit.tDTO.availablePlaces}" />
<p:message for="avl"></p:message>
<p:outputLabel>Type</p:outputLabel>
<p:inputText id="type" value="#{transportEdit.tDTO.type}" />
<p:message for="type"></p:message>
<p:outputLabel>Company</p:outputLabel>
<p:inputText id="company" value="#{transportEdit.tDTO.company}" />
<p:message for="company"></p:message>
<p:outputLabel>Price</p:outputLabel>
<p:outputLabel id="price" value="#{transportEdit.tDTO.price}" />
<p:outputLabel value=" Not Editable"></p:outputLabel>
<p:outputLabel>Departure Place</p:outputLabel>
<p:outputLabel id="dep_place" value="#{transportEdit.tDTO.departurePlace}" />
<p:outputLabel value = " Not Editable"/>
<p:outputLabel>Arrival Place</p:outputLabel>
<p:outputLabel id="arr_place" value="#{transportEdit.tDTO.arrivalPlace}" />
<p:outputLabel value = " Not Editable"/>
<p:outputLabel>Departure Date</p:outputLabel>
<h:outputText value="#{transportEdit.tDTO.departureDate}">
  		<f:convertDateTime type="date" pattern="dd-MM-yyyy" timeZone="Europe/Paris"/>
</h:outputText>
<p:outputLabel value = " Not Editable"/>
<p:outputLabel>Arrival Date</p:outputLabel>
<h:outputText value="#{transportEdit.tDTO.arrivalDate}">
  		<f:convertDateTime type="date" pattern="dd-MM-yyyy" timeZone="Europe/Paris"/>
</h:outputText>
<p:outputLabel value = " Not Editable"/>
	<h:outputLabel>Departure Time</h:outputLabel>
  	<h:outputText value="#{transportEdit.tDTO.departureTime}" >
    	<f:convertDateTime type="time" timeStyle="short" timeZone="Europe/Paris"/>
    </h:outputText>
    <p:outputLabel value = " Not Editable"/>
	<h:outputLabel>Arrival Time</h:outputLabel>
	<h:outputText value="#{transportEdit.tDTO.arrivalTime}">
    	<f:convertDateTime type="time" timeStyle="short" timeZone="Europe/Paris"/>
    </h:outputText>
    <p:outputLabel value = " Not Editable"/>
<f:facet name="footer">
<p:commandButton action="#{transportEdit.edit}" value="Edit data" ajax="false"/>
</f:facet>
</p:panelGrid>
<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />
</h:form>
</h:body>
</html>